<?php

/**
 * ActionFramework;
 * 
 * 		Framework for applying the MVC pattern in simple web applications.
 * 
 * Actions
 * =======
 * 
 * An action is a command given by the user. This can be as simple as "show me a list of to-do items",
 * or something more complicated as "create an account for me". Together with the command, also data
 * is passed to the server. Each action requires its own set of data to be provided. If all required
 * data is pressent, an action is "triggered", and results in a view.
 * 
 * (More details in the action.cls.php file)
 * 
 *  Views
 *  =====
 *  
 *  A view is an object that can be "send" to the user in the form of a html page. Views can require
 *  specific data when starting up. As an example, the "Show profile" view will need some profile data
 *  and a url to a picture associated with the profile. Views can be reused into other views, so that
 *  a main view can contain the general layout and more specific views reuse this layout.
 *  
 *  Defining a view is simple: any object that ends up having a send() method which echo's a html page
 *  will work. Typically, this is done the following way:
 *  
 *  class MyView {
 *  
 *  	private $data_to_show_1;
 *  	private $data_to_show_2;
 *  
 *  	public function __construct(data1, data2) {
 *  		$this->data_to_show_1 = data1;
 *  		$this->data_to_show_2 = data2;
 *  	}
 *  
 *  	public function send() {
 *  		$view = $this;
 *  		require 'views/my_view.php'; // in this file, $view->data_to_show_1, ... is used.
 * 		}
 *  }
 *  
 *  In case of reuse, templates typically use $view->content as a convention for indication where the
 *  main content goes. This convention is also used for the costumization of the default views that 
 *  use used for flagging invalid requests.
 *  
 *  Dispatching
 *  ===========
 *  
 *  The user provides the required action in the "action" request field, otherwise a default action will be 
 *  triggered. The dispatcher triggers the correct action. The dispatcher also takes care of checking 
 *  whether the user has enough permissions to request the action.
 *  
 *  (For more information, see the dispatcher.cls.php file)
 *  
 */

require_once dirname(__FILE__).'/errors.php';
require_once dirname(__FILE__).'/form.cls.php';
require_once dirname(__FILE__).'/formcomponents/core.php';
require_once dirname(__FILE__).'/system_views/all.cls.php';
require_once dirname(__FILE__).'/inputs.php';
require_once dirname(__FILE__).'/action.cls.php';
require_once dirname(__FILE__).'/dispatcher.cls.php';
require_once dirname(__FILE__).'/database.php';

?>